
<% include header %>

<div id="container" class="container">
  <div class="well head-title">
    <h1>欢迎来到 Microblog</h1>
    <p>Microblog一个基于Node.js的博客</p>
    <!-- <a  href="/post" class="post-blog">点击发布</a> -->
  </div>

  <div class="article-list">
    <% if(articleList.length){ %>
      <ul class="list-group">
        <% articleList.forEach(function(item){%>
          <li class="article-item list-group-item">
            <div class="panel panel-default">
              <div class="panel-heading head-title">
                <h2 class="panel-title"><%= item.title %></h2>
                <!-- <span class="post-blog delete-blog" data-id='<%= item._id %>'>删除</span> -->
                <a class="post-blog delete-blog" href='/blog/<%= item._id %>'>详细内容</a>
              </div>
              <div class="panel-body">
                <p><%- item.subTitle %></p>
                <p>分类：<%- item.classify %></p>
                <p>标签：<%- item.tag %></p>
                <img style="max-width: 300px;" src='<%= item.coverImg %>' alt="">
              </div>
              <div class="panel-footer text-right">
                此条微博来自最最骚气的你 ——  
                <a class="text-primary"><%= item.createTime %></a>
                <span><%- item.timeStamp %></span>
              </div>
            </div>
          </li>
        <% }) %>
      </ul>
    <% } else { %>
      <h1 class="text-center text-danger" style="height:250px;">很遗憾，暂无博文数据...</h1>
      <h4 class="text-center"><a>快去后台编写博客吧...</a></h4>
    <% } %>
  </div>
</div>
<hr/>

<% include footer %>

